/*
 * clog_category.c
 *
 *  Created on: 2012-8-12
 *      Author: lin
 */

#include "clog_category.h"
#include "collection/array_list.h"
clog_category_t *clog_category_new(const char* name,uint32_t id) {
    uint32_t len = (uint32_t)strlen(name);
    clog_category_t *c = zmalloc(
            sizeof(clog_category_t) + sizeof(char) * (len + 1));
    strcpy(c->name, name);
    c->id = id;
    c->name_len = len;
    return c;
}
